package 我的Java学习_算法基础.day_05;

public  class Suff implements Comparable<Suff>{
    String str;//后缀内容
    int index;//后缀起始下标
    public Suff(String str,int index){
        this.str=str;
        this.index=index;
    }

    @Override
    public int compareTo(Suff o) {
        return this.str.compareTo(o.str);   //比较后缀（字典序）
    }

    @Override
    public String toString() {
        return "Suf{"+"str="+str+",index="+index+'}';
    }
}
